package com;

import com.springbootcondition.Beans;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.util.Map;

@SpringBootApplication
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
        Map<String, Beans> beansOfType = new DefaultListableBeanFactory().getBeansOfType(Beans.class);
        Beans beans = beansOfType.get("beans");
        System.err.println(beans.getName());
    }

}
